#include <iostream>
using namespace std;

class Base
{
public:
	int m_base = 1;
};
class A:virtual public Base
{
public:
	int m_a = 2;
};

class B:virtual public Base
{
	int m_b = 3;
};

class D:public A,public B
{
	int m_d = 4;
};

int main()
{
	A a;
	cout << a.m_base << endl;

	B b;
	cout << b.m_base << endl;

	D d;
	cout << d.m_base << endl;
	//cout << d.A::m_base << endl;
  return 0;
}
